Skip to content

introduce sync calls for systems not doing fsync#704

Merged
george-larionov merged 2 commits into
ClickHouse:mainfrom
lukasvogel:main
Jan 30, 2026
Merged

introduce sync calls for systems not doing fsync#704
george-larionov merged 2 commits into
ClickHouse:mainfrom
lukasvogel:main

Conversation

@lukasvogel

Copy link
Copy Markdown
Contributor

Added sync around data loading for ClickHouse and Ursa as their load times are below the theoretical minimum for instances where the whole dataset fits into memory (cf Issue #678) .

I would also have liked to done it for TCHouse-C and Clickhouse Cloud but I have no idea of how to do that there.

I'm also sure there are other systems that don't do syncs but have longer load times anyway - I currently don't have time to test them all, though.

Also measured that locally on CedarDB and DuckDB - didn't have any effect, as expected. If you want to, we can also include it in future commits, though!

@lukasvogel

Copy link
Copy Markdown
Contributor Author

@rschu1ze @alexey-milovidov any updates on this?

@george-larionov george-larionov self-assigned this Jan 30, 2026

@george-larionov george-larionov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'll merge this PR and then re-run the affected benchmarks on our end to double check. Thanks for contributing!

@george-larionov george-larionov merged commit 3544fd5 into ClickHouse:main Jan 30, 2026
Comment thread clickhouse/benchmark.sh
# Measure load time including sync to disk
start=$(date +%s.%N)

clickhouse-client \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@george-larionov Should we simply add MT setting fsync_after_insert to the CREATE TABLE definition? This seems easier (fewer code changes) and more concise.

@rschu1ze

Copy link
Copy Markdown
Member

I guess we should also update the non-metal configurations, no?

@rschu1ze

Copy link
Copy Markdown
Member

I guess we should also update the non-metal configurations, no?

Ah, only metal configs are affected. We are good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants